package 蓝桥杯;

import java.util.Scanner;

/**
 * 分解质因数
 *
 * @author yang
 * @date 2021/12/24
 */
public class 分解质因数 {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        for (int i = a; i <= b; i++) {
            prime(i);
        }
    }

    private static void prime(int n) {
        StringBuffer sb = new StringBuffer(n+"=");

        for (int i = 2; i <= Math.sqrt(n); i++) {
            int a = 0, b = 0;
            while (n % i == 0) {
                a = i;
                n /= i;
                b++;
            }
            if (b > 1) {

                for (int y = 0; y < b; y++) {
                    if (sb.indexOf("=") == sb.length() - 1) {
                        sb.append(a);
                    }else {
                        sb.append("*"+a);
                    }

                }
            }

            if (b == 1) {
                if (sb.indexOf("=") == sb.length() - 1) {
                    sb.append(a);
                } else {
                    sb.append("*"+a);
                }

            }


        }
        if(n > 1) {
            if (sb.indexOf("=") == sb.length() - 1) {
                sb.append(n);
            } else
                sb.append("*"+n);

        }
        System.out.println(sb);
    }
}
